fixed bugs, finished text inputs coding.