add images, functions refatcored