changed the approach again; does not pass tests yet