Implements state and add test for position