added lot more functionality