cons and reverse instead of append