made code like the documentation