new opt function
updated readme