added HS_channel_write & debug prints