added suspend and resume func. and it never ends automatically