changed behavior and added a bunch of other stuffs