begining image loader functionality