Slide the sash back into place and lift the frame into your wall. If it is a big window, make sure you have someone help you with this. Once the window is in place, use your spirit level to check the window is level. If the window isn't plumb, use masonite packers to level it up. Then use your ruler to make sure the frame is flush with the internal wall face.