refactor - spread code