added writing and changed pin. not yet tested