modefied apple_out.v