first working version
separated x and y calculation into their own lines
removed unnecessary size hint
changed default window size