made Main take filename as argument