add resize directive