added remaining options and fixed php version compatibility bugs