Added function tests