reworked some code in Linux