cleaned up code
using mines