mid completion s03 algo ex2 & ex1