moved result slice from lib to template