moved data handling to model
added search functionality