rework specs and implementation