messy code for file size