refactor api. added to markup