Working code
merged with github setup