better arch and os handling