updated to use platform module