rewrite using only atoms & cons. No special processign for proc