Revised Implementation