made javascript more readable