fix specs and code