remove unused function
add a license header
encoding must be declared on first or second line