refractoring; clean up