reworked to match ends based on indentation
added pending example