changed api to exclude file extension