Made it more efficient