sample code from fs deep dive