Making my program work for more extensions.