input processing and animation