simplified + julia bugs fixed