popup minimum functionality working