split script for command line stuff