An analytical solution of frames with semi-rigid connections: considering semi-rigid connection as an element