Added pre- and post- conditions