messages library with page handlers functions