added old code from wicket project