Edited for new version