added key option to map statement, added selector statement, added selector tests