implemented append via fold right