necessary changes to make it work