Modified Client database, procedure and functions