add size method
implement basic auth
refactor code
it's ok