updated to work