Lade till flödesschema.
added variables and main function of the function

Sorry for not commiting the changes more frequently