Updated with platform specific codes