Made it a bit more efficient