updated and added test