add application class and some util class

maybe mess the code