fixed minor bug
added performance test