refactor code
add resouce files