input working. tests added.