rewritten everything into functions -> play main01.m