make window placing more dynamic