found a cleaner way