Refactor with Utility functions