Added convert operation

Closes #312