reformated the code and removed a few errors - sudharsan to test