slight optimization of get* functions