almost working gstbin implementation