Edited v3 for errors