various changes to make it work!