added animation duration variable
added modal option