working popup
refactor popup
working popup