construct and index functions added