update code
add methods and interface