code for building management module