save position and size