corrected some errors, removed unnecessary parameters