reorganize, fix scaling