more changes to make it work