add selectFrom function