Modified to remove errors