chat example: move input to seperate file