cleanup & improvements, callback approach