removed deprecated functions, added comments