Some slight modification based on last version