Added TOP variable to track top of rectangleSpace