readded prototype code