moved rectangle class to separate file
supply address of Y array after other arguments