add access method

add the attribute access method.