Added apply function
Added auxiliar messagedialog