updates to move legend around and deal with window size