Helper function added