add cast to record object