capturing correct elementId and writing it to the session