standardized some code