code now cleaner, but some functionality broken. WIP
refactor spec