added len and init q-expression functions