few fixes and convenient query methods