added parameter check
added testclass