added initial support for getState