Add functionality to accept hash