fixing check style issues
improving readability
simplifying code