re added pos increment logic