added support for multiple platforms