finished all functionality up to edit and counts