add new addParameter to method class

extends the Method class to a new addParameter function.