started tests and added minor changes