implemented suggested changes as per pull-request comments