method revised to follow coding standards