debugging on using prototype