partial code done on the Tessel client