refactored, using FImages