created some functions