removed unnecessary writes and parameters