rewrite shape as an enum