simplify the (still non-working) code