refactoring
function calls updated
fixes