insert working, retreive entries from db in correct order