cleanup bugs
adds a max options