refactor spec tasks