messy code before refactor/ clean