added return statements to feature calculation functions.