added resize function to portfolio