splitted up factorial example