more work from last commit

Signed-off-by: Justin Wiblin <the_lone_devil@justin-wiblin.tk>