adding helper functions