cleaned up to make more readable