add proper licence
tidied example