Added api functionality