Version 3.1.0 with improvements