add class apply and update
Merge pull request #19 from typesafehub/wip/methods

add class apply and update