now fully working