finished adding minimize functionality