rewrite to make shorter