fixed prototype functions