working version before scaling the sizes