improved check_input function & updated all records table