bug fix : pin input and suspend
use optimization
updated