renamed funtion requiredfn