modified from terminal