make accessor more generic