started adding secret support & documenting code