Added return value for offset.
reverted name style changes because of template magic bugs.