implemented wireing correctly.