parametize and organize, could use a reader