move framework code
add mac support