write simple orm