Cleaned up conditional statement