wrote my functions