Works. May add GUI interface in the future