more code tuning