made options and allowed for switching of context
finished first pass at aip module after seeing resposnes