personal function debugged