added
formatting and code improvement