adding code in methods.js in order to get rid of error messages