made it automatic