works but can simplify