IssueID #4: reduce code