Davood's utility functions