a more elegant implementation of fibonacci generator