modified some using functional..