Done implementation, ready to test tf out of this