. "Though I am all for OO programming, if the OP asks for a shorter and faster way: functions and especially classes are not the way to go" . . .