found some bugs by debugging
added firmware test