only for running under terminal