modified for integration with Pushwoosh