nose test fix
refactor