added constructor that takes platform