Adding new procedures in javascript