fleshing out functionality
fix tests