writing long instead of object