add application factory & test