mapping custom queries

revised explanation