v2 Added features and fixed bugs