updated for multi-platform