added progress check and input check