added ability to add and remove inputs but not fully tested