refactor to silex squeleton