Helper functions added