some refactoring and unification
now able to use different shader programs