Added code for simple version