updated for bug  fix