little changes to make it work