revising code style based on review feedback