removed 'fd' argument and added it to the mode argument