update crud example and modularize crud methods