tried to get mutex's working but couldn't