shorter code in ast01