basic step by step simulation of accepting input strings