implemented previous variables