added sun lamp functionality and fixed related bugs