adding data structure
adding dimension fixing
oversize function
changing from unneeded guards