initial tests added; minor errors fixed to pass tests