Write hardware part of further work

possible further improvements