extending application refactored