update main box position