updated and working