improved Rd
improved Rd, adjusted attributes for ld function
added function