Cleaner way to do the same