Created 2 functions