refactored a bit for github