trying to output function not working