rewrite to slim