rewrite property and write tests