Need to write wrappers for calculating element offset and parent offset