signals added and many other changes