add premitive select and insert function