Added new rewritten version