add events to caps namespace
add error handling. add getter methods