If there is a cleaner way to do this, please let me know