improved console script