first attemt for the C programm