changed syscall to properly read