modify to prototype coding