better anvil logic