chage constructor to can select file