added test and better workflow