x,y's were in wrong position, renamed for clarity, boundaries work