feature calculation rewritten