added head method and tests