r structure and source
r functions