implemented queue in c