Thumbnail stuff
Added range function