Modularized, reworked version
adding version no.