(refactor) un-commented for functionality