add appended input, slight refactor