rewrite prototype base