add os dectect method