removed unnecessary def functions