only reading one char from buffer, todo: state handling und foo