Added Tested Code
Minor bug fix