- put all script into functions