Added function checking