Implemented required functionality.