finish controller methods and add test