older version, conflicts with Akshays new
merged