initial MVC implementation
added Pin existing check