Added stem calc, related to issue #478