added tmp files to gitignore
made cap an input parameter (instead of a constant)