trying to made my codes cleaner