restoring code to before embedly testing