modified main files for speed; uses binary formats