simplified main procedure and added custom shader libraries