proper sorting algorithm.  check for intersecting rectangles for stamps (stamps still dont work properly)