move soem code around