initial implementation for the runanalysis script