Updated to pass tests