added invoice persistence