added status assign and is error. changed prints into inline