updated to work 3