It trains, but must be tested. Added --write flag