update to include much less code