added prototype-methods implementation