rough add. Includes all functionality -- ajax does not work yet.