Finalized implimentation; fixed for older versions