Changed method slightly