change data structure
drag/resize functionality refactoring