Added er model and test cases