task 12: made function, added test