first attempt at file API