class refactor - corrected callback