change name of method to getState