created helper functions