refactoing to use lambda
added method to get auto complete for model