beam.cpp file added