integrating felix's changes