refactoring - loaded image twice, not necessary