refactored into framework specific impelementation