moved sdk code to redsift.js