need to fix input bugs