cleaned up readability of code