basic pseudocode for jscale